<?php 
namespace Wdl\model;
use Wdl\helper\webHelper;

class base {
    public $_W = null;
    public $_GPC = null;
    public $uniacid = 0;
    public $openid = '';

    public $uid = 0;
    public $_forms;
    public $other;
    public $operation = 'display';
    public $app;
    /** 
     * @var $app kbwdl_shequzufangModuleWxapp 对象
     */
    public function __construct( $app  ){      
        global $_W, $_GPC;
        $this->app = $app;
        $this->_W = $_W;
        $this->_GPC = $_GPC;
        $this->operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
        $this->uniacid  = webHelper::bindUniacid();
        $this->uid      = $_W['member']['uid']; 
        $this->openid   = !empty($_W['openid']) ?$_W['openid']: (isset($_GPC['openid']) ? $_GPC['openid'] :'') ;
    }

    public function display()
    {
        
        return $this->msg(0,'\Wdl\model\base::run()方法返回', $this->_W);
    }

    public function msg($code = 0, $msg = '', $data =[])
    { 
        return  [
            'code' => $code,
            'msg' => $msg, 
            'data' => $data,
        ];
    }
}